package com.example.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
import java.util.List;

@Data
@EqualsAndHashCode(callSuper = true)
@TableName("dish_comment")
@Schema(description = "菜谱评价实体")
public class DishComment extends BaseEntity {
    
    @Schema(description = "菜品ID")
    @NotNull(message = "菜品ID不能为空")
    private Long dishId;
    
    @Schema(description = "用户ID")
    @NotNull(message = "用户ID不能为空")
    private Long userId;
    
    @Schema(description = "评价内容")
    private String content;
    
    @Schema(description = "图片URL数组(JSON格式)")
    private List<String> imageUrls;
    
    @Schema(description = "评分(1-5分)")
    @NotNull(message = "评分不能为空")
    private Integer rating;
    
    @Schema(description = "状态：0-待审核，1-已通过，2-已拒绝")
    private Integer status;
} 